package com.windy.common.header;

/**
 * Created by liyufeng on 2022/5/9
 */
public class KafkaHeader implements Header {
    private org.apache.kafka.common.header.Header header;

    public KafkaHeader(org.apache.kafka.common.header.Header header) {
        this.header = header;
    }

    @Override
    public String key() {
        return header.key();
    }

    @Override
    public String value() {
        return new String (header.value());
    }

    @Override
    public String toString() {
        return "KafkaHeader{" +
                "key=" + key() +"，"+
                "value=" + value() +
                '}';
    }
}
